package lambda;

import org.springframework.objenesis.instantiator.android.Android10Instantiator;

/**
 * @ProjectName: sky-take-out
 * @Titile: A
 * @Author: 霍静
 * @Description: TODO
 */
public class TestA{

    public static void main(String[] args) {
        //A接口匿名内部类
        A a1 = new A(){
            @Override
            public void show(String name, String age) {
                System.out.println("name:"+name+"age:"+age);
            }
        };
        a1.show("李四","19");

        //Lambda表达式
        A a2 = (name,age)->System.out.println("name:"+name+"age:"+age);

        a2.show("张三","18");


    }

}
